home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / grafica / pvrgjpeg / dct.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  4KB  |  175 lines

  1. /*************************************************************
  2. Copyright (C) 1990, 1991, 1993 Andy C. Hung, all rights reserved.
  3. PUBLIC DOMAIN LICENSE: Stanford University Portable Video Research
  4. Group. If you use this software, you agree to the following: This
  5. program package is purely experimental, and is licensed "as is".
  6. Permission is granted to use, modify, and distribute this program
  7. without charge for any purpose, provided this license/ disclaimer
  8. notice appears in the copies.  No warranty or maintenance is given,
  9. either expressed or implied.  In no event shall the author(s) be
  10. liable to you or a third party for any special, incidental,
  11. consequential, or other damages, arising out of the use or inability
  12. to use the program for any purpose (or the loss of data), even if we
  13. have been advised of such possibilities.  Any public reference or
  14. advertisement of this source code should refer to it as the Portable
  15. Video Research Group (PVRG) code, and not by any author(s) (or
  16. Stanford University) name.
  17. *************************************************************/
  18. /*
  19. ************************************************************
  20. dct.h
  21.  
  22. This file contains the basic DCT matrix values for the reference DCT
  23. transform.  It doesn't matter if it is slow because it is rarely used.
  24. A butterfly would be much faster.
  25.  
  26. ************************************************************
  27. */
  28.  
  29. #ifndef DCT_DONE
  30. #define DCT_DONE
  31.  
  32. #define DC_QUARTER 1.41421356237309504880
  33. #define DC_THREE_EIGHTHS 0.76536686473017954348
  34. #define DC_ONE_EIGHTH 1.84775906502257351226
  35.  
  36. /* Bitshifted Twelve */
  37.  
  38. #define IC_QUARTER 2896
  39. #define IC_THREE_EIGHTHS 1567
  40. #define IC_ONE_EIGHTH 3784
  41.  
  42.  
  43. double DctMatrix[] = {
  44. 0.3535533905932737,
  45. 0.3535533905932737,
  46. 0.3535533905932737,
  47. 0.3535533905932737,
  48. 0.3535533905932737,
  49. 0.3535533905932737,
  50. 0.3535533905932737,
  51. 0.3535533905932737,
  52. 0.4903926402016152,
  53. 0.4157348061512727,
  54. 0.2777851165098011,
  55. 0.0975451610080642,
  56. -0.0975451610080641,
  57. -0.2777851165098010,
  58. -0.4157348061512727,
  59. -0.4903926402016152,
  60. 0.4619397662556434,
  61. 0.1913417161825449,
  62. -0.1913417161825449,
  63. -0.4619397662556434,
  64. -0.4619397662556434,
  65. -0.1913417161825452,
  66. 0.1913417161825450,
  67. 0.4619397662556432,
  68. 0.4157348061512727,
  69. -0.0975451610080641,
  70. -0.4903926402016152,
  71. -0.2777851165098011,
  72. 0.2777851165098009,
  73. 0.4903926402016153,
  74. 0.0975451610080640,
  75. -0.4157348061512721,
  76. 0.3535533905932738,
  77. -0.3535533905932737,
  78. -0.3535533905932738,
  79. 0.3535533905932737,
  80. 0.3535533905932738,
  81. -0.3535533905932733,
  82. -0.3535533905932736,
  83. 0.3535533905932733,
  84. 0.2777851165098011,
  85. -0.4903926402016152,
  86. 0.0975451610080641,
  87. 0.4157348061512728,
  88. -0.4157348061512726,
  89. -0.0975451610080649,
  90. 0.4903926402016152,
  91. -0.2777851165098008,
  92. 0.1913417161825449,
  93. -0.4619397662556434,
  94. 0.4619397662556432,
  95. -0.1913417161825449,
  96. -0.1913417161825453,
  97. 0.4619397662556437,
  98. -0.4619397662556435,
  99. 0.1913417161825431,
  100. 0.0975451610080642,
  101. -0.2777851165098011,
  102. 0.4157348061512728,
  103. -0.4903926402016153,
  104. 0.4903926402016152,
  105. -0.4157348061512720,
  106. 0.2777851165098022,
  107. -0.0975451610080625};
  108. static double IDctMatrix[] = {
  109. 0.3535533905932737,
  110. 0.4903926402016152,
  111. 0.4619397662556434,
  112. 0.4157348061512727,
  113. 0.3535533905932738,
  114. 0.2777851165098011,
  115. 0.1913417161825449,
  116. 0.0975451610080642,
  117. 0.3535533905932737,
  118. 0.4157348061512727,
  119. 0.1913417161825449,
  120. -0.0975451610080641,
  121. -0.3535533905932737,
  122. -0.4903926402016152,
  123. -0.4619397662556434,
  124. -0.2777851165098011,
  125. 0.3535533905932737,
  126. 0.2777851165098011,
  127. -0.1913417161825449,
  128. -0.4903926402016152,
  129. -0.3535533905932738,
  130. 0.0975451610080641,
  131. 0.4619397662556432,
  132. 0.4157348061512728,
  133. 0.3535533905932737,
  134. 0.0975451610080642,
  135. -0.4619397662556434,
  136. -0.2777851165098011,
  137. 0.3535533905932737,
  138. 0.4157348061512728,
  139. -0.1913417161825449,
  140. -0.4903926402016153,
  141. 0.3535533905932737,
  142. -0.0975451610080641,
  143. -0.4619397662556434,
  144. 0.2777851165098009,
  145. 0.3535533905932738,
  146. -0.4157348061512726,
  147. -0.1913417161825453,
  148. 0.4903926402016152,
  149. 0.3535533905932737,
  150. -0.2777851165098010,
  151. -0.1913417161825452,
  152. 0.4903926402016153,
  153. -0.3535533905932733,
  154. -0.0975451610080649,
  155. 0.4619397662556437,
  156. -0.4157348061512720,
  157. 0.3535533905932737,
  158. -0.4157348061512727,
  159. 0.1913417161825450,
  160. 0.0975451610080640,
  161. -0.3535533905932736,
  162. 0.4903926402016152,
  163. -0.4619397662556435,
  164. 0.2777851165098022,
  165. 0.3535533905932737,
  166. -0.4903926402016152,
  167. 0.4619397662556432,
  168. -0.4157348061512721,
  169. 0.3535533905932733,
  170. -0.2777851165098008,
  171. 0.1913417161825431,
  172. -0.0975451610080625};
  173.  
  174. #endif
  175.